<?php
require("db_manage/dbFunctions.php");
//require("suppliersPage.php");
/**
* This script will be used to explore the database
* and return the information stored by email.
*
* Author: Armand Pallino
* Date: 11/24/12
**/

function requestorsPopulate()
{
	$dbh = connectDB();
	$query = "SELECT * FROM Requestors WHERE is_active=1";
	$stmt = $dbh->prepare($query);
	$stmt->execute();
	$results = $stmt->fetchAll(PDO::FETCH_ASSOC); 

	$return_string = "";
	foreach($results as $requestor)
	{
		$return_string .= "<option value=\"" . $requestor['email'] . "\">" . $requestor['first_name'] . " " . $requestor['last_name'] . " - " . $requestor['email'] . "</option>\n";
	}

	$stmt = null;
	$dbh = null;

	return $return_string;
}
?>
